package com.blockmeta.bbs.businesslibrary.flutter;

import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.StandardMethodCodec;

public class GetDataNewFlutterPlugins {
    private static final String GETDATA_CHANNEL_NAME = "AsynchronousMethodChannelExample";

    public static void register(BinaryMessenger messenger) {
        new AsynchronousMethodChannel(messenger, GETDATA_CHANNEL_NAME, StandardMethodCodec.INSTANCE)
                .setMethodCallHandler((call, result) -> {
            switch (call.method){
                case "getBatteryLevel":
                    result.success(null);
                    result.successAsynchronous("batteryislow");
                    break;
            }
        });
    }

}
